# include t-rs6000 too
# this is taken from t-ppccomm
# but crt* removed.


LIB2FUNCS_EXTRA = tramp.S

# This one can't end up in shared libgcc
LIB2FUNCS_STATIC_EXTRA = eabi.S

# We want fine grained libraries, so use the new code to build the
# floating point emulation libraries.
FPBIT = fp-bit.c
DPBIT = dp-bit.c


dp-bit.c: $(srcdir)/config/fp-bit.c
	cat $(srcdir)/config/fp-bit.c > dp-bit.c

fp-bit.c: $(srcdir)/config/fp-bit.c
	echo '#define FLOAT' > fp-bit.c
	cat $(srcdir)/config/fp-bit.c >> fp-bit.c

eabi.S: $(srcdir)/config/rs6000/eabi.asm
	cat $(srcdir)/config/rs6000/eabi.asm > eabi.S

tramp.S: $(srcdir)/config/rs6000/tramp.asm
	cat $(srcdir)/config/rs6000/tramp.asm > tramp.S

# Switch synonyms
MULTILIB_MATCHES_FLOAT	= msoft-float=mcpu?401 \
			  msoft-float=mcpu?403 \
			  msoft-float=mcpu?ec603e \
			  msoft-float=mcpu?801 \
			  msoft-float=mcpu?821 \
			  msoft-float=mcpu?823 \
			  msoft-float=mcpu?860
MULTILIB_MATCHES_ENDIAN	= mlittle=mlittle-endian mbig=mbig-endian
MULTILIB_MATCHES_SYSV	= mcall-sysv=mcall-sysv-eabi mcall-sysv=mcall-sysv-noeabi mcall-sysv=mcall-linux mcall-sysv=mcall-netbsd

LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
EXTRA_MULTILIB_PARTS = crtsavres$(objext)

crtsavres.S: $(srcdir)/config/rs6000/crtsavres.asm
	cat $(srcdir)/config/rs6000/crtsavres.asm >crtsavres.S

$(T)crtsavres$(objext): crtsavres.S
	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c crtsavres.S -o $(T)crtsavres$(objext)

# It is important that crtbegin.o, etc., aren't surprised by stuff in .sdata.
CRTSTUFF_T_CFLAGS = -msdata=none
# Make sure crt*.o are built with -fPIC even if configured with 
# --enable-shared --disable-multilib
CRTSTUFF_T_CFLAGS_S = -fPIC -msdata=none
